package ua.com.fesvlast.hotel.tests.dao;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

import ua.com.fesvlast.hotel.model.dao.DAOFactory;
import ua.com.fesvlast.hotel.model.enteties.Contacts;

public class ContactsADAOTests {
	
	Contacts contact =new Contacts();
	
	
	@Before
	public void init(){
		contact.setAddress("First street");
		contact.setCity("Kiev");
		contact.setCountry("Ukraine");
		contact.setEmail("user@user.com");
		contact.setFirstName("user");
		contact.setLastName("user");
		contact.setPhone("0658745634");
		contact.setUserId(3);
	}
	
	
	@Test
	public void insertionDataintoDATABASE(){
		assertEquals("Ibnput the object into table(return true)", true, DAOFactory.getContactsDAO().createContact(contact));
	}

}
